#ifndef __WIZ_GEOMETRY_GEOMETRY_SPHERE_HPP__SHANHAOBO_19800429__
#define __WIZ_GEOMETRY_GEOMETRY_SPHERE_HPP__SHANHAOBO_19800429__

#include "../../WizAlgebra/Include/Utils/WizAlgebraUtils.hpp"
#include "../../WizAlgebra/Include/Linear/Vector3/WizAlgebraVector3.hpp"

namespace Wiz
{
    namespace Sphere
    {
        template<class ElementT>
        struct Type
        {
            WIZ_DECLARE_CLASS_THIS(Type);
            typedef ElementT                            tElement;
            typedef ::Wiz::Vector3::Type<tElement>      tVector3;
        public:
            tVector3            m_Center;
            tElement            m_Radius;
        public:
            Type()
            {
            }
            Type(const tVector3 Cntr, const tElement& Rds) : m_Center(Cntr), m_Radius(Rds)
            {
            }
        public:
            ::Wiz::Void::Type SetCenter(const tVector3& Cntr)
            {
                this->m_Center = Cntr;
            }
            ::Wiz::Void::Type SetRadius(const tElement& Rds)
            {
                this->m_Radius = Rds;
            }
        public:
            tVector3& GetCenter()
            {
                return this->m_Center;
            }
            const tVector3& GetCenter() const
            {
                return this->m_Center;
            }
            tElement& GetRadius()
            {
                return this->m_Radius;
            }
            const tElement& GetRadius() const
            {
                return this->m_Radius;
            }
        public:
            ::Wiz::Bool::Type IsIn(const tVector3& Pos)
            {
                if ((this->m_Center - Pos).SqrLength() < this->m_Radius * this->m_Radius)
                {
                    return ::Wiz::Bool::True;
                }

                return ::Wiz::Bool::False;
            }
        }; /// end of struct Type
    } /// end of namespace Sphere
} /// end of namespace Wiz

#endif /*__WIZ_GEOMETRY_GEOMETRY_SPHERE_HPP__SHANHAOBO_19800429__*/
